package com.ncwu.cart.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ncwu.common.annotation.Excel;
import com.ncwu.common.core.domain.BaseEntity;

/**
 * 购物车管理对象 tb_cart
 * 
 * @author lq
 * @date 2025-05-13
 */
public class TbCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车条目id  */
    @Excel(name = "购物车条目id ")
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 商品id */
    @Excel(name = "商品id")
    private Long productId;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long num;

    /** 商品标题 */
    @Excel(name = "商品标题")
    private String name;

    /** 商品动态属性键值集 */
    @Excel(name = "商品动态属性键值集")
    private String spec;

    /** 价格,单位：分 */
    @Excel(name = "价格,单位：分")
    private Long price;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String image;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setNum(Long num) 
    {
        this.num = num;
    }

    public Long getNum() 
    {
        return num;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setSpec(String spec) 
    {
        this.spec = spec;
    }

    public String getSpec() 
    {
        return spec;
    }

    public void setPrice(Long price) 
    {
        this.price = price;
    }

    public Long getPrice() 
    {
        return price;
    }

    public void setImage(String image) 
    {
        this.image = image;
    }

    public String getImage() 
    {
        return image;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("num", getNum())
            .append("name", getName())
            .append("spec", getSpec())
            .append("price", getPrice())
            .append("image", getImage())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
